/**
 * Created by yuyongzhen  <1640599564@qq.com>>.
 */

var angular = require('angular');
var ngRoute = require('angular-route');

var depModule = [
	'ngRoute',
	'DashBoardControllers',
	'DashBoardDirectives',
	'DashBoardServices',
	'DashBoardFilter',
	'CommonControllers',
	'CommonDirectives',
	'TopicControllers',
	'TopicDirectives',
	'topListService'
];

var CrawerManagement = angular.module('crawer-management',depModule, ['$compileProvider', function ($compileProvider) {
    $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|ftp|mailto|file|javascript):/);
}]);

var CommonControllers = angular.module('CommonControllers',[]);
var CommonDirectives = angular.module('CommonDirectives',[]);
var TopicControllers = angular.module('TopicControllers',[]);
var DashBoardControllers = angular.module('DashBoardControllers',[]);
var DashBoardDirectives = angular.module('DashBoardDirectives', []);
var DashBoardServices = angular.module('DashBoardServices', []);
var DashBoardFilter = angular.module('DashBoardFilter',[]);
var TopicDirectives = angular.module('TopicDirectives', []);
var topListService = angular.module('topListService', []);


require('./router.js')(CrawerManagement);

//公共
require('./controller/common/base.js')(CommonControllers,'CommonControllers.base');
require('./controller/common/head.js')(CommonControllers,'CommonControllers.head');
require('./controller/common/sidebar.js')(CommonControllers,'CommonControllers.sidebar');
require('./directive/common/page/index.js')(CommonDirectives,'pageTag');

//概览
require('./controller/dashboard/fetchcollect.js')(DashBoardControllers,'DashBoardControllers.fetchcollect');
require('./controller/dashboard/topicstat.js')(DashBoardControllers,'DashBoardControllers.topicstat');
require('./controller/dashboard/domainstat.js')(DashBoardControllers,'DashBoardControllers.domainstat');
require('./controller/dashboard/sourcestat.js')(DashBoardControllers,'DashBoardControllers.sourcestat');
require('./controller/dashboard/realtimestat.js')(DashBoardControllers,'DashBoardControllers.realtimestat');
require('./controller/dashboard/fetchdetail.js')(DashBoardControllers,'DashBoardControllers.fetchdetail');
require('./directive/dashboard/filternavs/index.js')(DashBoardDirectives,'filterNavs');
require('./service/dashboard/realtimestat.js')(DashBoardServices,'realtimestat');
require('./service/dashboard/fetchcollect.js')(DashBoardServices,'fetchcollect');
require('./service/dashboard/fetchdetail.js')(DashBoardServices,'dashboardFetchDetail');
require('./filter/dashboard.js')(DashBoardFilter);

//主题
require('./controller/topic/topiclist.js')(TopicControllers,'TopicControllers.topiclist');
require('./controller/topic/topiccreate.js')(TopicControllers,'TopicControllers.topiccreate');
require('./controller/topic/topicedit.js')(TopicControllers,'TopicControllers.topicedit');
require('./directive/topic/topic_create_form/index.js')(TopicDirectives,'topicCreateForm');
require('./controller/topic/sourcelist.js')(TopicControllers,'TopicControllers.sourcelist');
require('./controller/topic/addsource.js')(TopicControllers,'TopicControllers.addsource');
require('./directive/topic/source_add_form/index.js')(TopicDirectives,'sourceAddForm');

require('./directive/topic/parseCreate/index.js')(TopicDirectives,'parseCreate');
require('./controller/topic/parserList.js')(TopicControllers,'TopicControllers.parserList');
require('./controller/topic/parserDetail.js')(TopicControllers,'TopicControllers.parserDetail');

require('./directive/topic/seed_add_form/index.js')(TopicDirectives,'seedCreate');
require('./controller/topic/seedList.js')(TopicControllers,'TopicControllers.seedList');
require('./controller/topic/seedDetail.js')(TopicControllers,'TopicControllers.seedDetail');

//公用
require('./service/top_list_service.js')(topListService,'topListService');

module.exports = CrawerManagement;
